package zwp.example.demo1.demo_controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import zwp.example.demo1.demo_abstract.DemoEnumAbstract;
import zwp.example.demo1.demo_pojo.enumdemo.DemoEnum;

import static zwp.example.demo1.demo_pojo.enumdemo.DemoEnum.LOW_VOLTAGE;

/**
 * @author zwp14
 */
@RestController
@RequestMapping("/enum")
@RequiredArgsConstructor
public class DemoEnumController extends DemoEnumAbstract {


    @PostMapping("/test")
    public String enumTest(){
        //第一步：入口
        return test();
    }

    @Override
    public DemoEnum getOrderType() {
        return LOW_VOLTAGE;
    }

    @Override
    public String test (){
        //第二步：父类实现
        return super.test();
    }


}
